extern crate usrtrust;

use usrtrust::{Environment,sys_blocks,SysBlocks};
use std::path::{Path};
use std::io::{Write,Result};

fn main() -> Result<()> {
    let e = Environment::from_dir(Path::new("/tmp/usrtos"))?;
    let sysname = e.find("system_block")?;
    println!("find {}",sysname);
    let mut sys = SysBlocks::new(sysname)?;
    let blocks = sys_blocks();
    sys.build(&blocks);
    Ok(())
}